<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
  const str = "120.581482,31.300159;120.579875,31.29663;120.586304,31.29663;120.587407,31.300095"
  const arr = str.split(';')
  const result = arr.map(item=>[item.split(',')[0],item.split(',')[1]])
  console.log(result)
</script>
</body>
</html>
